package com.iqiyi.pps.epg.core.model.rtmp;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "rtmp_server")
@Cache(usage = CacheConcurrencyStrategy.NONE)
public class RtmpServer {
    public static final int STATUS_DISABLE = 1;
    public static final int STATUS_ENABLE = 2;

    public static final int PORT_DEFAULT = 8080;
    public static final int PORT_NEW = 8181;

    private Integer id;
    private String privateIp;
    private String publicIp;
    private int port;
    private int parseType;
    private String idc;
    private String descr;
    private Integer status;
    private Timestamp createTime;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "private_ip")
    public String getPrivateIp() {
        return privateIp;
    }

    public void setPrivateIp(String privateIp) {
        this.privateIp = privateIp;
    }

    @Column(name = "public_ip")
    public String getPublicIp() {
        return publicIp;
    }

    public void setPublicIp(String publicIp) {
        this.publicIp = publicIp;
    }

    @Column(name = "port")
    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    @Column(name = "parse_type")
    public int getParseType() {
        return parseType;
    }

    public void setParseType(int parseType) {
        this.parseType = parseType;
    }

    public String getIdc() {
        return idc;
    }

    public void setIdc(String idc) {
        this.idc = idc;
    }

    public String getDescr() {
        return descr;
    }

    public void setDescr(String descr) {
        this.descr = descr;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Column(name = "create_time", insertable = false, updatable = false)
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
}
